class rq {
	static fetchGet(url,data={}){
		uni.showLoading({
			title:"loading"
		})
		return new Promise((resolve,reject)=>{
			uni.request({
				url:url,
				data:data,
			}).then(res=>{
				resolve(res)
				uni.hideLoading()
			}).catch(e=>{
				uni.showLoading({
					title:"数据请求失败"
				})
				reject(e);
			})
		})
	}
}

export default rq;